Mega Code Archive

Categories
1) Android
2) ASP.Net
3) ASP.Net Tutorial
4) C
5) C Tutorial
6) C#
7) C# Book
8) C# by API
9) C# Tutorial
10) C++
11) C++ Tutorial
12) Delphi
13) Flash ActionScript
14) Flex
15) Java
16) Java Book
17) Java by API
18) Java Tutorial
19) JavaScript DHTML
20) JavaScript Reference
21) JavaScript Tutorial
22) MSOfficeExcel 2007 Tutorial
23) MSOfficePowerPoint 2007 Tutorial
24) MSOfficeWord 2007 Tutorial
25) MSSQL
26) MSSQL Tutorial
27) MySQL
28) MySQL Tutorial
29) Oracle PLSQL
30) Oracle PLSQL Tutorial
31) Perl
32) Php
33) PostgreSQL
34) Python
35) Python Tutorial
36) Ruby
37) Silverlight
38) VB.Net
39) VB.Net by API
40) VB.Net Tutorial
41) Visual C++ .NET
42) VisualBasic Script
43) XML
44) XML Tutorial
 
Java Tutorial
1) 2D Graphics
2) Ant
3) Apache Common
4) Class Definition
5) Collections
6) Data Type
7) Database
8) Design Pattern
9) Development
10) EJB3
11) Email
12) File
13) Generics
14) Hibernate
15) Internationalization
16) J2EE Application
17) J2ME
18) JPA
19) JSP
20) JSTL
21) JUnit
22) Language
23) Log
24) Network
25) Operators
26) PDF
27) Reflection
28) Regular Expressions
29) Security
30) Servlet
31) Spring
32) Statement Control
33) Swing
34) Swing Event
35) SWT
36) SWT 2D Graphics
37) Thread
38) Web Services SOA
39) XML
Class Definition
1) A class that contains a static initializer
2) A Class that Demonstrates Shadowing
3) A collection of utilities to workaround limitations of Java clone framework
4) A demonstration of abstract
5) A method that returns an anonymous inner class
6) A Partial Interface Implementation
7) A Superclass Variable Can Reference a Subclass Object
8) A very efficient java hash algorithm, based on the BuzHash algoritm
9) Abstract Classes
10) Access Control
11) Access inner class from outside
12) Accessibility
13) Accessing its enclosing instance from an inner class
14) An anonymous inner class that calls the base-class constructor
15) An anonymous inner class that performs initialization
16) An example of polymorphism
17) An inner class cannot be overriden like a method
18) Anonymous inner class cannot have a named constructor, only an instance initializer
19) Argument must be final to use inside anonymous inner class
20) Arrays are automatically cloneable
21) Assignment with objects is a bit tricky
22) Base class for demonstation of final methods
23) Blank final fields
24) Building the anonymous inner class in-place
25) By Value or By Reference
26) Calling a Constructor From a Constructor
27) Cast after cloning
28) Checking whether the object referenced was of type String
29) Class Access Control Modifiers
30) Class declaration with a method that has a parameter
31) Class declaration with one method
32) Class Initializer
33) Class Member Access Control Modifiers
34) Class Member Access Matrix
35) Class Object
36) Class that contains a String instance variable and methods to set and get its value
37) Class with a constructor to initialize instance variables
38) Cleanup and inheritance
39) Clone an array
40) Clone an object with clone method from parent
41) Combining composition and inheritance
42) Comparing Object Values Using Hash Codes
43) Comparing Objects
44) Composition with public objects
45) Computing hash codes
46) Construct clone of an object
47) Construct clone of an object and call constructor in the super class
48) Constructors and polymorphism dont produce what you might expect
49) Copy an serializable object deeply
50) Copying Objects implements Cloneable
51) Create a Singleton Object
52) Creating a constructor for an anonymous inner class
53) Creating a Multilevel Hierarchy
54) Creating a new nested object outside
55) Creating inner classes
56) Creating instances of inner classes
57) Creating Objects
58) Creating Objects of a Class
59) Deep clone Object
60) Deep clone serializingde-serializng Clone
61) Default access level
62) Define an inner class within a for loop
63) Define the static member
64) Define your own equals method
65) Defining Classes
66) Defining references to inner classes
67) Demonstrate an inner class
68) Demonstrate Run-Time Type Information
69) Demonstrate static variables, methods, and blocks
70) Demonstrate the clone() method
71) Demonstrate variable-length arguments
72) Demonstrate when constructors are called in a Multilevel Hierarchy
73) Demonstrates anonymous classes
74) Demonstrates how final variables are replaced at compilation time
75) Demonstrates method-scoped inner classes
76) Demonstrates Static nested Classes
77) Demonstrates that all classes descend from the type java lang Object
78) Demonstrates the pitfalls of depending on the order of static initializers
79) Demonstrates various initializers
80) Demonstrating variable-length arguments
81) Demonstration of both constructor and ordinary method overloading
82) Demonstration of final class members
83) Demonstration of final constants
84) Demonstration of final variables
85) Demonstration of some static nested classes
86) Demonstration of the Pointers and References Concept
87) Derived Class Constructors
88) Deriving a Class
89) Downcasting and Run-Time Type Identification (RTTI)
90) Duplicating Objects using a Constructor
91) Dynamic Method Dispatch
92) Dynamically changing the behavior of an object via composition (the State design pattern)
93) Encapsulating Constants in a Program
94) Explicit static initialization with the static clause
95) Extending Interfaces
96) Fields
97) Fields and Methods in an Interface
98) Final Classes
99) Final Variables
100) Fully qualified name
101) Get hash code for primitive data types
102) Get the identity hash codes
103) Getting java lang Class
104) Implement equals method using commons-lang
105) Implement hashCode using commons-lang
106) Implements a manager of lists that stores the lists by key
107) Import all classes
108) Import statements
109) Importing Other Classes
110) In a class hierarchy, private members remain private to their class
111) Inheritance
112) Inheritance and upcasting
113) Inheritance, constructors and arguments
114) Initialization order
115) Initializer for final static field
116) Initializing Data Members
117) Initializing interface fields with non-constant initializers
118) Inside main( ), the static method callme( ) and the static variable b are accessed outside of their class
119) Interfaces and Abstract Classes
120) Interfaces and Multiple Inheritance
121) Interfaces and Polymorphism
122) Jakarta Commons toString Builder
123) Java Final variable
124) Limiting the object Types in a Variable Argument List
125) Load a Class that is not on the classpath
126) Local inner class can have a constructor
127) Make methods that have unspecified number of parameters
128) Making an entire class final
129) Manipulate properties after clone operation
130) Memory Leak Demo
131) Method Overloading
132) Method Overriding
133) Method overriding Demo
134) Methods
135) Methods Accepting a Variable Number of objects
136) Methods with differing type signatures are overloaded - not overridden
137) Mixed Initializer
138) Multiple Constructors
139) Multiple interfaces
140) Nested Classes
141) Nested classes (static inner classes)
142) Nested classes can access all members of all levels of the classes they are nested within
143) Nesting a class within a method
144) Nesting a class within a scope
145) Nesting Classes in an Interface Definition
146) Null Safe Hash Code
147) Order of constructor calls
148) Overloading a base-class method name in a derived class does not hide the base-class versions
149) Overloading based on the order of the arguments
150) Overloading Vararg Methods
151) Override the clone() method
152) Override the toString method in your classes
153) Override toString() for Box class
154) Overriding a Base Class Method
155) Pass long parameters to overloading method
156) Passing Objects to a Method
157) Passing objects to methods
158) Polymorphism
159) Primitives and overloading
160) Print classpath
161) Private Override
162) Proper inheritance of an inner class
163) Protected void finalize() throws Throwable
164) Public Object clone() throws CloneNotSupportedException
165) Putting test code in a nested class
166) Recursion
167) Recursive factorial method
168) Recursive fibonacci method
169) Recursive method to find all permutations of a String
170) Reference inner static class
171) Reference Passing Test
172) Reference static field after declaration
173) Reflection based toString() utilities
174) Returning a reference to an inner class
175) Returning From a Method
176) Returning Objects
177) Returns an integer hash code representing the given double array value
178) Scope class demonstrates field and local variable scopes
179) Scope for Class and Local Variables
180) Secure Hash
181) Serializable Clone
182) Shallow copy then deep copy
183) Specifying Access Attributes
184) Specifying initial values in a class definition
185) Static field, constructor and exception
186) Static import
187) Static importing the Math Class Methods
188) Static Members
189) Static Nested Classes
190) Static section Initializer and logic
191) Static section of Initializer
192) Storing a reference to the String object as type Object
193) The Class class also brings the possibility of creating an object without using the new keyword
194) The Default Constructor
195) The effect of final on fields
196) The extends Keyword
197) The full process of initialization
198) The keyword super represents an instance of the direct superclass of the current object
199) The null Keyword
200) The protected keyword
201) The public Book class
202) The this Keyword
203) The Towers of Hanoi
204) To implement an interface
205) Two ways that a class can implement multiple interfaces
206) Type Casting
207) Understand the effects of public and private access
208) Use a generic toString()
209) Use an array to pass a variable number of arguments to a method This is the old-style approach to variable-length argumen
210) Use anonymous inner classes
211) Use CompareToBuilder class to create compareTo method for your own class
212) Use Reflection To build toString method
213) Use static import to bring sqrt() and pow() into view
214) Use varargs with standard arguments
215) Uses serialization to perform deep copy cloning
216) Using abstract methods and classes
217) Using Access Attributes
218) Using Constructors
219) Using final to Prevent Overriding
220) Using final with method arguments
221) Using Initialization Blocks
222) Using inner classes for callbacks
223) Using instance initialization to perform construction on an anonymous inner class
224) Using Method Overloading
225) Using Objects
226) Using overloaded methods to print array of different types
227) Using run-time polymorphism
228) Using varargs with standard arguments
229) Variable in subclass hides the variable in the super class
230) What Is a Java Class
231) With concrete or abstract classes, inner classes are the only way to produce the effect of multiple implementation inheri
232) You can override a private or private final method